package com.example.demo.controller;

import com.example.demo.bean.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 用户控制层
 * @author jz
 */
@Controller
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("user")
    @ResponseBody
    public String getUser(){
        return userService.getUser().toString();
    }
}
